<template>
  <div class="weui-form-preview">
    <div class="weui-form-preview__hd">
      <label class="weui-form-preview__label">{{list[0].label}}</label>
      <em class="weui-form-preview__value">{{list[0].value}}</em>
    </div>
    <div class="weui-form-preview__bd">
      <p v-for="item in list.slice(1)">
        <label class="weui-form-preview__label">{{item.label}}</label>
        <span class="weui-form-preview__value">{{item.value}}</span>
      </p>
    </div>
    <div class="weui-form-preview__ft">
      <a class="weui-form-preview__btn" href="javascript:" v-for="(item, index) in button_list" @click="$emit('on-click', index, id)"
	    :class="{'weui-form-preview__btn_primary':item.type=='primary', 'weui-form-preview__btn_default':item.type!='primary'}">
	    {{item.label}}
	  </a>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    list: Array,
	button_list: Array,
	id: {
	  type: String,
	  default: ''
	}
  }
}
</script>

<style>
@import 'weui/dist/style/weui.min.css';
</style>
